import request from '@/utils/request'
export const articleGetCategoryService = () =>
  request.get('/my/cate/list')
export const articleUpdataService = (data) =>
  request.put('/my/cate/info', data)
export const articleAddService = (data) =>
  request.post('/my/cate/add', data)
export const articleDeleteService = (id) =>
  request.delete('/my/cate/del', {
    params: { id }
  })
export const articleGetListService = (params) =>
  request.get('/my/article/list', { params })
//获取文章详情
export const articleGetInofService = (id) =>
  request.get('/my/article/info', {
    params: { id }
  })

export const articlePublishService = (data) =>
  request.post('/my/article/add', data)
export const articleUpInfoService = (data) =>
  request.put('/my/article/info', data)

//删除文章
export const articleDeleServicle = (id) =>
  request.delete('/my/article/info', {
    params: { id }
  })
